ComponentOne Data Source for Entity Framework
C1.LiveLinq Namespace / IndexedQueryExtensions Class / GroupBy Method / GroupBy<TSource,TKey>(IIndexedSource<TSource>,Expression<Func<TSource,TKey>>) Method
The type of the elements of source.
The type of the key returned by keySelector.
An C1.LiveLinq.Indexing.IIndexedSource<T> whose elements to group
A function to extract the key for each element.

In This Topic
    GroupBy<TSource,TKey>(IIndexedSource<TSource>,Expression<Func<TSource,TKey>>) Method
    In This Topic
    Groups the elements of a collection according to a specified key selector function.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Function GroupBy
        (Of TSource,TKey)( _
       ByVal source As IIndexedSource(Of TSource), _
       ByVal keySelector As System.Linq.Expressions.Expression(Of Func(Of TSource,TKey)) _
    ) As IIndexedSource(Of IGrouping(Of TKey,TSource))
    public static IIndexedSource<IGrouping<TKey,TSource>> GroupBy<TSource,TKey>( 
       IIndexedSource<TSource> source,
       System.Linq.Expressions.Expression<Func<TSource,TKey>> keySelector
    )

    Parameters

    source
    An C1.LiveLinq.Indexing.IIndexedSource<T> whose elements to group
    keySelector
    A function to extract the key for each element.

    Type Parameters

    TSource
    The type of the elements of source.
    TKey
    The type of the key returned by keySelector.

    Return Value

    A collection of System.Linq.IGrouping`2 objects each containing a sequence of objects and a key.
    See Also